package com.legendshop.openportal.sdk.model.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author jzh
 * @version 1.0.0
 * @title QueryExtEnum
 * @date 2025/4/15 17:04
 * @description：
 */
@Getter
@AllArgsConstructor
public enum QueryExtEnum {

    ADDRESS("address"),
    BUYER("buyer"),
    PAYMENT_TYPE("paymentType"),
    REFUND_TYPE("refundType"),

    ;

    private final String value;


    /**
     * 获取多个QueryExtEnum的value值
     * @param queryExtEnums
     * @return
     */
    public static String getStr(QueryExtEnum... queryExtEnums) {
        if (queryExtEnums == null || queryExtEnums.length == 0) {
            return null;
        }

        return Arrays.stream(queryExtEnums).map(QueryExtEnum::getValue).collect(Collectors.joining(","));
    }
}
